home *** CD-ROM | disk | FTP | other *** search
/ The Programmer Disk / The Programmer Disk (Microforum).iso / xpro / qb2 / pro16 / wdce.bas < prev    next >
BASIC Source File  |  1992-02-06  |  5KB  |  110 lines

  1. ' WDCE.Bas
  2. ' Portions Copyright 1987-1990 Microsoft Corp.
  3. WindowDoClickEvent:
  4.  
  5.     SELECT CASE HSClick(currEvent).action
  6.         CASE 1                                          'ButtonClick
  7.             SELECT CASE HSClick(currEvent).misc2
  8.                 CASE 1
  9.                     IF ButtonHighLight THEN
  10.                       IF currButton <> HSClick(currEvent).misc THEN
  11.                         ButtonSetState currButton, origState
  12.                         currButton = HSClick(currEvent).misc
  13.                         ButtonSetState currButton, 3
  14.                       END IF
  15.                     ELSE
  16.                       currButton = HSClick(currEvent).misc
  17.                       origState = ButtonInquire(currButton)
  18.                       ButtonHighLight = TRUE
  19.                       ButtonSetState currButton, 3
  20.                     END IF
  21.               
  22.                     currCursorRow = HSClick(currEvent).row1
  23.                     currCursorCol = HSClick(currEvent).col1 + 1
  24.                     GOSUB WindowDoShowTextCursor
  25.                 CASE 2, 3
  26.                     currCursorRow = HSClick(currEvent).row1
  27.                     currCursorCol = HSClick(currEvent).col1 + 1
  28.                     GOSUB WindowDoShowTextCursor
  29.                 CASE 4
  30.                     IF ButtonHighLight THEN
  31.                       ButtonSetState currButton, origState
  32.                     END IF
  33.  
  34.                     GloStorage.oldDialogEvent = 1
  35.                     GloStorage.oldDialogButton = HSClick(currEvent).misc
  36.                     GloStorage.oldDialogRow = _
  37.                               MouseRow - HSClick(currEvent).row1 + 1
  38.                     GloStorage.oldDialogCol = _
  39.                               MouseCol - HSClick(currEvent).col1 + 1
  40.                     ExitFlag = TRUE
  41.                 CASE 5
  42.                     IF ButtonHighLight THEN
  43.                       IF currButton <> HSClick(currEvent).misc THEN
  44.                         ButtonSetState currButton, origState
  45.                         currButton = HSClick(currEvent).misc
  46.                         ButtonSetState currButton, 3
  47.                       END IF
  48.                     ELSE
  49.                       currButton = HSClick(currEvent).misc
  50.                       origState = ButtonInquire(currButton)
  51.                       ButtonHighLight = TRUE
  52.                       ButtonSetState currButton, 3
  53.                     END IF
  54.               
  55.                     currCursorRow = HSClick(currEvent).row1 + 1
  56.                     currCursorCol = HSClick(currEvent).col1 + 2
  57.                     GOSUB WindowDoShowTextCursor
  58.                 CASE 6
  59.                     GloStorage.oldDialogEvent = 1
  60.                     GloStorage.oldDialogButton = HSClick(currEvent).misc
  61.  
  62.                     IF MouseRow = HSClick(currEvent).row1 THEN
  63.                       GloStorage.oldDialogScroll = -1
  64.                     ELSEIF MouseRow = HSClick(currEvent).row2 THEN
  65.                       GloStorage.oldDialogScroll = -2
  66.                     ELSE
  67.                       GloStorage.oldDialogScroll = _
  68.                                 MouseRow - HSClick(currEvent).row1
  69.                     END IF
  70.  
  71.                     ExitFlag = TRUE
  72.                 CASE 7
  73.                     GloStorage.oldDialogEvent = 1
  74.                     GloStorage.oldDialogButton = HSClick(currEvent).misc
  75.  
  76.                     IF MouseCol = HSClick(currEvent).col1 THEN
  77.                       GloStorage.oldDialogScroll = -1
  78.                     ELSEIF MouseCol = HSClick(currEvent).col2 THEN
  79.                       GloStorage.oldDialogScroll = -2
  80.                     ELSE
  81.                       GloStorage.oldDialogScroll = _
  82.                                 MouseCol - HSClick(currEvent).col1
  83.                     END IF
  84.  
  85.                     ExitFlag = TRUE
  86.                 CASE ELSE
  87.             END SELECT
  88.         CASE 2                                  'Edit Field Click
  89.             GloStorage.oldDialogEvent = 2       'Event ID #2
  90.             GloStorage.oldDialogEdit = HSClick(currEvent).misc
  91.             ExitFlag = TRUE
  92.         CASE 5
  93.             GOSUB WindowDoSize                  'Internally handle Re-Size
  94.             ExitFlag = TRUE
  95.             GloStorage.oldDialogEvent = 5
  96.         CASE 15
  97.             GOSUB WindowDoHideTextCursor
  98.             GOSUB WindowDoMove                  'Internally handle Move
  99.             ExitFlag = TRUE
  100.             GloStorage.oldDialogEvent = 15
  101.         CASE ELSE
  102.             
  103.     END SELECT
  104.  
  105.     IF HSClick(currEvent).action <> 1 THEN
  106.       GOSUB WindowDoUnHighlightButton
  107.     END IF
  108.  
  109. RETURN
  110.